package com.zbkj.dal.feign.vo;

import com.fasterxml.jackson.annotation.JsonAlias;
import lombok.Data;

import java.util.Objects;

/**
 * @author likangbing
 * @date 2020-9-10 11:11
 */
@Data
public class BaseResponse {

    /**
     * 错误码
     */
    @JsonAlias("errcode")
    private Integer errCode;

    /**
     * 错误信息提示
     */
    @JsonAlias("errmsg")
    private String errMsg;

    private static final Integer SUCCESS_CODE = 0;

    public boolean isSuccess() {
        return Objects.equals(errCode, SUCCESS_CODE);
    }
}
